import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [{
    path: "/",
    redirect: "/home"
  },
  {
    path: "/data",
    name: "data",
    component: () => import("../views/data.vue"),
    
  },
  {
    path: "/login",
    name: "login",
    component: () => import("../views/login.vue"),
    
  },

   {
    path: "/index",
    name: "index",
    component: () => import("../views/index.vue"),
    children:[
       {
    path: "/home",
    name: "home",
    component: () => import("../views/home.vue"),
    
  },
  {
    path: "/list",
    name: "list",
    component: () => import("../views/list.vue"),
  },
  {
    path: "/list1",
    name: "list1",
    component: () => import("../views/list1.vue"),
  },
  {
    path: "/ti",
    name: "ti",
    component: () => import("../views/ti.vue"),
  },
 
  {
    path: "/car",
    name: "car",
    component: () => import("../views/car.vue"),
  },
  {
    path: "/my",
    name: "my",
    component: () => import("../views/my.vue"),
  },
    ]
  },
 
];

const router = new VueRouter({
  routes,
});

export default router;